A police watchdog probe was launched after the remains of the 52-year-old were found in a house in Dumfries in February last year.
Bailey Trial: 'I Didn't Mean To Stab Him'
A teenager accused of murdering a school pupil told police "I didn't mean to, but I stabbed him'', a court has heard.
Bailey Gwynne, 16, died from a single knife wound after a fight at Cults Academy in Aberdeen on October 28 last year.
A 16-year-old youth denies murder and is on trial at the city's High Court, where the jury was shown an interview he gave to police the day after.
He told officers: "I saw him (Bailey) coming round the corner so I took out my knife to scare him - I wasn't going to stab him.''
The accused, who cannot be identified for legal reasons, said he was carrying a knife and a knuckleduster because he never fitted in and "was just trying to be cool''.
He told police: "I had them just to act tough.''
The teenager is accused of murdering Bailey by striking him on the body with a knife and being in possession of knives and two knuckledusters on various occasions between August 1 2013 and the day of the pupil's death.
On day three of the trial, the jury was shown the full interview he gave at Kittybrewster police station on October 29.
He said Bailey had made a comment about someone not wanting to get any fatter and he (the accused) had said "like your mum''.
He told police Bailey came towards him with a clenched fist "looking pretty angry'' and "as he approached me, I pulled out a knife, opened it out and tried to scare him away with it''.
He said: "He got in the way and it stabbed him.''
The court heard he bought a knuckleduster and knife online "Because they don't check if you're 18 or not''.
The youth broke down during the interview when he was told of the charge being brought against him.
He said: "I'm being charged with murder?'' before putting his hands over his face and telling officers: "I did try to save him.''
The trial heard earlier that a laptop used by the teenager had revealed an internet search for ''how to get rid of someone annoying''.
Forensic computer analyst Charles Bruce, 52, examined an Acer laptop given to police by the accused's father the day after Bailey's death, and told how he also recovered search terms including ''knuckledusters UK'' and ''knife merchant''.
He noted the search term ''difference between a homicide and a murder'' on April 15, 2015 and ''illegal knives UK'' on August 13 that year.
The laptop examination also revealed a search with the term ''how to get rid of someone annoying'' on October 7, and three days before a web address was recovered relating to a YouTube video with the title ''14-year-old Bronx student stabs bully to death outside school''.
Mr Bruce was asked under cross-examination if he was aware that the YouTube address led to a cartoon and that the search for ''how to get rid of someone annoying'' brought up an inquiry by a nine-year-old and responses such as ''be mean''.
Defence counsel Ian Duguid QC said: ''It sounds like nobody followed through on these searches to see what they are.''
Mr Bruce said: ''I was under the impression the inquiry team might be going through these.''
The trial, before Lady Stacey, continues on Friday.
The accident happened at about 7.50pm on Thursday in Moodiesburn, North Lanarkshire.
More than 70 firefighters were needed to bring the blaze under control at Blochairn Fruit Market in the early hours of Thursday.
The multi-coloured walkway will run up to the entrance of Silverburn shopping centre between Saturday and Sunday.
Most Viewed Pictures On Heart
Recently Played Tracks
To listen live, choose your preferred station:
Now playing: The best feel good music
Deposit £10 to get a £40 Welcome Bonus - That's £50 to play bingo, slots and more!*
Over 50 tracks to make you feel-good. New album out now...
Find your local four day weather report here.
Make Heart the soundtrack to your day and you could be a winner with great prizes up for grabs throughout the day.
Find out more about some of the companies advertising on Heart Scotland- East.