cleanup code
be silent about exceptions, just write them into the log file