Log method changed:
- now logs to buffer and at the end of aplication write to file, close #16