show proper error messages for invalid file input on import

Wold not have guessed that, good to know.