Tweaked logging level and added an error handler