logging catch exception print error fix