added missing initialization and set pointer to NULL after deletion
moved filesystem init further up, to be able to log errors earlier
Merge pull request #332 from tdev/beamng

some small patches