Added support for reporting exceptions to a file