Fix error handling in installApp