Added displayError method