debug prints for write