breaking up logs into directories