clean up import
add some log, need further discussion with console
merge DEPLOY and UPGRADE_AGENT;