Added logger to json http handler

Fixed a failure when attempting to add new record
Added opt type