Logging exceptions during actions