Corrects file mode