Added file reading to main method