simplified method to list file in a directory