Fixed fildes creation functions and perms checks