Add logs
Fix bug caused by faulty debug