fully integrated parameters; various updates

Updated event logging (now logs on export failure, not just on success).
Updated logic for export (used to be reversed for command line exit
codes). Integrated $path parameter. Removed several commented lines
which are no longer used.