Extract installation checking logic