Move mode into directory block