use ->file_mode rather than ->filemode