adds printing of env if exists in run_command()