better error handling on import statement itself