Flag for debug output
Correctly set err on bad rate options

fixes StackExchange/tsaf#126