code cleanup. debug logging moved to api calling layer for upload subcommand