import_files: Handle exceptions better.