File type is directory fix