catch and log all exceptions