Write failures to file