added new error msg in function call