fix group id
add hook to remove file at end if needed