On their return to England in September, Mary and Percy moved--with Claire Clairmont, who took lodgings nearby--to Bath, where they hoped to keep Claire's pregnancy secret. At Cologny, Mary Godwin had received two letters from her half-sister, Fanny Imlay, who alluded to her "unhappy life"; on 9 October, Fanny wrote an "alarming letter" from Bristol that sent Percy Shelley racing off to search for her, without success. On the morning of 10 October, Fanny Imlay was found dead in a room at a Swansea inn, along with a suicide note and a laudanum bottle. On 10 December, Percy Shelley's wife, Harriet, was discovered drowned in the Serpentine, a lake in Hyde Park, London. Both suicides were hushed up. Harriet's family obstructed Percy Shelley's efforts--fully supported by Mary Godwin--to assume custody of his two children by Harriet. His lawyers advised him to improve his case by marrying; so he and Mary, who was pregnant again, married on 30 December 1816 at St Mildred's Church, Bread Street, London. Mr and Mrs Godwin were present and the marriage ended the family rift.  Claire Clairmont gave birth to a baby girl on 13 January, at first called Alba, later Allegra. In March of that year, the Chancery Court ruled Percy Shelley morally unfit to assume custody of his children and later placed them with a clergyman's family. Also in March, the Shelleys moved with Claire and Alba to Albion House at Marlow, Buckinghamshire, a large, damp building on the river Thames. There Mary Shelley gave birth to her third child, Clara, on 2 September. At Marlow, they entertained their new friends Marianne and Leigh Hunt, worked hard at their writing, and often discussed politics.  Early in the summer of 1817, Mary Shelley finished Frankenstein, which was published anonymously in January 1818. Reviewers and readers assumed that Percy Shelley was the author, since the book was published with his preface and dedicated to his political hero William Godwin. At Marlow, Mary edited the joint journal of the group's 1814 Continental journey, adding material written in Switzerland in 1816, along with Percy's poem "Mont Blanc". The result was the History of a Six Weeks' Tour, published in November 1817. That autumn, Percy Shelley often lived away from home in London to evade creditors. The threat of a debtor's prison, combined with their ill health and fears of losing custody of their children, contributed to the couple's decision to leave England for Italy on 12 March 1818, taking Claire Clairmont and Alba with them. They had no intention of returning.

Answer this question "Why did they fear losing custody?" by extracting the answer from the text above.
The threat of a debtor's prison,