Filtering and data output using JSON

Allow filtering to a single id via -filterid and allow output to a data file using JSON via -datalogfile