Use File class readlines method

Use File class readlines method for faster file reading.