fix from/to confusino and add option to output to named file