take care of filemode