added require() function to check if command exists