Add exception + log4j

Add exception on the fromString method
Add log4j with unit tests