change the filemode.