openFileForWriting($fh, 'file.log') or die "Couldn't open log file to store the crash report: $!";