Output result to file to be polled