Trying to fix bug where reading line from file is undefined.