Can you post compilable code that shows how you both list all files, and how you print the output that shows what this list contains? There are no known bugs in this function AFAIK.