1. logging
2. check integrity, act carefully