write to wfile