Added code to enable debugging via a JVM runtime option.
Added better error handling of invalid date ranges.