better file format handling