Added optional output parameter

The README file was also updated to match the new option.