more error handling and logging