fixed bug in log exception handling on file open