Threadify file logger, handle save files form cmdline

fixes #638