The judge may not inspect a presentence report and the contents of the report may not be disclosed to any person unless:
(1) the defendant pleads guilty or nolo contendere or is convicted of the offense; or
(2) the defendant, in writing, authorizes the judge to inspect the report.