add error cases to fs_opendir