Put file reading into main