Output useful debug info instead of crashing.