add notification and response when writing is finished