added an option that allows a user to send output to a file
fixed a bug where xml output wouldn't print