make output goto file

make output goto file rather than stdin/stdout/stderr , if paramters
specified.