Return err object in callback instead of throwing