Fixes insert_file()