Don't try to close a possibly-unopened file. We don't need to convert fclose(pubf) into if (pubf) fclose(pubf) because the break <"ret"> goes to code that does the latter.