More error handling for importing