Harry broke unwritten rule and 'compromised safety' with his memoir