be at pains
be at pains {v. phr.}
To be extremely desirous to do something; to take the trouble to do something.
The captain was at pains to see that everybody got safely into the lifeboats.
Categories:
Source: A Dictionary of American Idioms