add truncate to slave.c