trying to add listing the directory using Dir.foreach