Applied smart pointers to the File classes