1. CSV IO now included
2. debug info has been standardized to output to standard error