Error pattern and directory restructuring