removing debug logging, tightening permissions