Rewrote File and FileStream with smart pointers