escriptize and brush up cui

TODO:

- fail and log in each record if the format is bad
- specify output logger for each recept file
- output filename and line number into log