user can provide path for output file