try to write file