report package installation errors, simplify code