Exception handling to address IOError on log.info