if you decided to use pointer toi the file, it's better to use smart_pointers.