add option PLAN_TO_CHANGE and modyfi code write_log