resolve segmentation fault on file name