Added loop param to the file reader