Fixed Write Loop