added proper error message