added charset to writeload()