added new decorater to check key error