File reorganization to rules