callback: Handle race condition, print exceptions.