Fixed broken IsFile func