adding checks earlier to see if ambari is running