adding error statements