added output file option