Added try..catch around app generator