Ensure we close files after parsing pom for validation