changed call order to make sense

Second argument is always a document for import_file, third argument
which is optional is the extension.