Ick. I think this should just check for existence of the file rather than trying to parse error messages.