Added better error messages.