I made some changes to the behaviour. Please pull it!

- always create a new file to write
- log file name end with .txt
- save log on each step