replaced debug with warn