Use the same condition for arity check as is used in promisifaction code
remove console logs