Bug fix.

- Code style changes.
- An issue lead to delete current exist file fixed(check file validity algorithm).
Comment changes.