Fix gruntfile doc upload task
Improve state-validation messages