Added more sophisticated logging options, config can be viewed with the srm tool. Still having serious problems with the preview handler.