Use logging library instead of console.log

Makes sense, we should add a GLError type (or GLProgramError type) and throw here.