stop writing data into file