fixed segfault when input is directory and verbose mode is on