getting console output from ls command