better debug output, fixed case where leep can be empty and done() wasn't called