Add error management + tests

Add util.format also to have neat string.
Merge pull request #8 from VirtuOz/add-error-management

Add error management + tests