Added error message when stathat fails