finish file mode