close opened file if process exits earlier
fix for when boost wave cpp lexer throws an exception 'Unterminated c++ style comment' when last line of the source file contains '//' style comment which obviously does not need any terminating