damn umask. correcting how we open files