change newJlog to return nil log if error occurs