completed readFileLine function and made small changes and bugfixes