Added capped option and file output for raw log data