added exception printing to log