file mode fixes