Add safety to debug print.