changed open file mode