Fixed write and append