Fixed write as sudo