better initial file perm saving and checking for it