#177 Added better error messages