fix write to file which not exists