I'm confused, what line should go away? I was a little uncertain as to whether writeFile should assume the data passed to it is already base64 encoded, or whether it should assume the data passed to it is binary and encode it.