Added check for root and removed hard coded ip address missed earlier