I don't think you can put $in{'Filename'} inside a quoted string. It won't interpolate the variable. You need to remove the single quotes or assign the value to another variable and use that, eg:
my $file = $in{'Filename'};
my $file = $in{'Filename'};