Change line https://github.com/wchen-r7/metasploit-framework/blob/1350cd5a81da9abf137bb394471172e7b376166f/modules/auxiliary/analyze/jtr_aix.rb#L45 to a block form `File.open` and this loine to the `end` of the block.