update(Check file existing and fix session)