Added a wait for writing bytes