wrap all glfw wrapper functions to check for errors