Add management of file's exception errors.

Rename library in lib.
Add some comments.
Rename library folder to lib.