Added error message for failed select.