Fixed error output in callback