handling RecordNotFound error