improved error handling
removed logger statement