Write failures to a file