If '-o' option is given, print the output to the specified file.