Change the logic of checking piped files from boolean to sinon spy.