Convert to bytes before writing out