added error files writing when cmd fails
Merge branch 'master' of https://github.com/FNNDSC/chrisreloaded