correct filemode