Add support for outputting to a file

Currently only useful in combination with '-c'