Make tests fail if no output is received
Remove debug code
Reset wrong file name in deferred function