Checking the user and removed sudo. Using the new common functions