fix removing logs when debug is on