The snapshot script is improved.