cleanup printf invocations in ls()