added exception logging into files