Removing some debugging statement and fixing string formatting error in ls function