Made preparations for file writing