Adding stopLocalMedia method, allow passing of custom logger, rename 'log' option to 'debug'