Indexes files in directories but does not print filename in output