Add exception handling for import errors