added error message in sample18