redirect error file, add memory input option
Merge remote-tracking branch 'upstream/master'