Loop over files in directories