Logical error @write(); boundary check

check the log.