Akward file mode change