Added -o output file option.