Added write medium API