Cleanup

Just a couple of pendantic things with error handling, plus some better comments.
```c
return fclose(spool) ? -1 : 0;
```