save exception into log file