extended import error handling and added log functionality