A failure by a trial magistrate to provide written reasons for sentence constitutes a misdirection that entitles an appellate court to impose a fresh sentence. However, pursuant to section 38(2) of the High Court Act, no sentence shall be set aside unless the court considers that a substantial miscarriage of justice has actually occurred. Where aggravating factors such as breach of employer's trust, premeditation, commission out of greed rather than need, and high value of stolen property are present, a custodial sentence is appropriate even for a first offender who pleaded guilty and where all stolen property was recovered. The recovery of stolen property does not automatically warrant a non-custodial sentence where significant aggravating factors exist.