Fixed a segfault when file_name doesn't contains dot