log exceptions to file