in reply to umask with 0666
If you do so, there will be a short period where the file will have a more restrictive mask than desired. I don't know if that matters in your case.