modify file mode to allow read and write