changed outfile and logfile to overwrite, not append; changed options.get() to options[]; streamlined error message output