adding feature to specify output in result writer class