Provide option to specify a log callback instead of using console.error