refactor the transaction
fix the filenot found bug