fix windows build, remove unnecessary include, more precise error message