Add helper to handle files across PHP versions