sync before cp

synchronise the logfile before making a `cp`