Use SplFileObject instead of file()