added error checking to shader loader