always fflush(stdout), don't feed NULL to strcmp on undefined behavior