better handling of error when installation fails