Fix file mode type in module_file