Adding helper function to Change directory and list files