Updated and improved error catch in header ReadShader.h