fix a bug when fileName is empty