Fixed list_files to return results array

Function list_files() does not currently return the results array if the connection is successful.
Please commit the proposed change.