change gruntfile check t be more robust