improve error info when permissions fail