Fixed list function not listing files