added parameters to output and allow output file