fix problem with getoutput, CAF-304
Make things consistent between rest and DB. CAF-276
Merge pull request #4040 from spigad/failedfiles

fix problem with getoutput, CAF-304
Merge pull request #4041 from mmascher/consistency-CAF-276

Make things consistent between rest and DB. CAF-276