How to convert a non-native file to a native file