Add management of file's exception errors.

Rename library in lib.
Add some comments.