loop not only over directories