Added file reader for scanner instead of running it through the terminal