unfortunately file.serialize is broken, working around it