Add constructor for filewriter