Adding debug log writes