Added a check so it doesn't just spit out a bunch of fputcsv errors