making errorCallback overloaded for backward compatibility