open mode of results file changed from 'a' to 'w'