resolves #53 allow safe mode to be specified as int, string or enum