Fixed File lifetime, a few warnings