Improvement @ERROR and logging handling