Error checking buildProgram