added block to confirm that the compression succeeds before confirmation to user