Fixed linenumber bug with token location, fixed the file access race condition by switching from POSIX file IO to C++ Streaming IO