add logger for try/except