Commands: ls and ls -l added,having a problem with exit function incorrectly triggering and error