write file with project default charset