Added error messages for shaders and loops