Fixed #169, Added logging on exceptions