Extracts args handling
Uses path.basename
Changes the API
output as now a listener to the traversal