give better error if file cannot be parsed (closes #16)
derive -r from -o (closes #17)