Add support for storing read data to file

This adds support for storing read data to the file specified by -f or --file. This is useful when
lots of logs flood your terminal, saving them to disk makes it easy to analyze afterward.