Output error file on failure