Improved logging and handling of dev-to-dist tasks
update from original repo