Added code to read in the file from redirect pipe