Rework log (error and exception handler)