[ref #38] fix bug when file extension is null