A man obsessed with child porn who amassed more than 400 images over four years has said he was glad to be caught after being handed a suspended jail sentence on Tuesday.

David John Lavers, from Newlyn, was caught by police with indecent images of children, including 23 in the most serious category, and accepted that he had an unhealthy interest in the children but was relieved that he had been found out so that he could begin rehabilitation.

Lavers, of Navy Inn Court, had drifted into this world and then found it difficult to get out, his solicitor Barry Hilliard told Truro magistrates.

Lavers pleaded guilty to six offences of making indecent photographs of a child at Penzance between January and July last year, and one of possessing indecent photographs between June 2012 and July last year.

Alison May for the CPS said the prosecution was the result of work by an ongoing monitoring investigation of this type of behaviour. Police had seized the defendant’s laptop, USB stick and mobile phone, and had found 23 indecent images of children, described as category A, 13 of category B and 404 of category C.

Lavers told officers he had visited various chat sites. He was not interested in child pornography, but accepted he had been chatting on the sites about children in a sexual way, but that it was fantasy on his part. On some occasions he had used a false profile.

Mr Hilliard said Lavers accepted that in some respects he had a problem.

He said: “He has an unhealthy interest in children, is effectively dysfunctional because of his current restricted life. He has found himself drifting into this world and found it difficult to extricate himself from it. It was with some relief that he has been caught because he can begin the process of being rehabilitated.”

Lavers was given a six month prison sentence suspended for 24 months, and told to pay £185 costs and charges. The magistrates also made a sexual harm prevention order against him, for seven years.