File variables now named after filenames

Also fixed handling of binary files
Raw/native flags are now respected