permissions
--debug and --log options added