Made usage of JCR sessions thread safe
Code refactored, logging improved