Applied smart pointers to File classes