changed outfile stream from ReadStream to WriteStream
1.0.2