Added error message when keys missing