Added error handling around creation of new app