add clean-output object to Makefile to clean program outputs
change to flush result.txt every time