Made sure results are not written/printed more than once