Moved directory list retrieval to run() method