Use endl to flush the buffer