updated output logic for html
fixed problem with using hash for resultset
added file option and version check