logger fixed
write exception to log