added support for custom outfile option #12