Opened the file for writing