Added rescue for RecordNotFound error