Added commented-out print statements for debugging later
Added debug logging with a -d or --debug option