add transaction file
fix bugs when shutdown