improved file cleanup after extraction