Nah, it was late when I wrote this and I somehow got it into my head that iolist_to_binary only took lists. Will fix.