Added new event handler for selecting a folder