Added logging support. Added exception handling and logging to JSON parsing.