finalized filewriter