adding some error message handler