Also pledge() and unveil() as soon as possible, to avoid the log file breaking out.
Right now there's a nasty memory bug I need to fix. Will have to run this through valgrind.