Fix perlcritic issues in activity_file.pl