stage2 handles multiple input directories