Add some debug output for writes