in reply to Perl Log file error

Try changing lines

open(my $OUTF, ">$OutputFile")

to
open(my $OUTF, ">>",$OutputFile) #Append mode