move futimes etc to generic code