Wrap the app creation within a function to allow changing the directory.