add sanity checks to state logging, use vec4 instead of vec3