Use `CAF::FileWriter` here:

```perl
my $fh = CAF::FileWriter->new($pubcfg_new, log => $self);
 ``