Update: added user interaction with more i/o control in format.R