Add better error messages in places