- added overwrite parameter to ResMgr interface
- close ofstream after usage ( in case of exception it may still leak FIXME )