New function to get application root