Added more logging and default error handling