Added function to retrieve the app directory