Improved support for importing files.