flushing and fprintf