I've been able to keep them over 3 years, I believe the biggest contributor to an early demise, will be overfeeding. Most people think of overfeeding is only about the amount you feed at a feeding. In the case of ambush predators, it's usually in the form of feeding too frequently. Within 6 months a weekly feeding will suffice. They follow a gorge/fast feeding routine; so feed well until you see a nice bulge, then give some time between feedings for digestion. Temp may also come into play; in the wild they are in water temps in the high 60s to 70, so keep the water temp at the lowest end you can.
Nitrates may play a role, but it appears to be at about 30ppm or higher. I did notice some decline in appetite when nitrates reached that high. When they go off feeding; check nitrates, assess whether you have been overfeeding, boost up your mg, just let them take a break. Don't go longer than 3 weeks without getting very concerned. They can go long periods without eating, but at some point, they just won't eat again.
Rockwork, I've found the warty isn't that big on cave dwelling, they'd be happier perched on your fav coral. They will wedge themselves against a rock with a bit of overhang. They don't care for strong flow or high light, so there does need to be spots in the tank with blocked, subdued flow, as well as lighting. The painted angler needs a cave.
I feed my ghosties Omega One micro pellets. You can feed them a variety of high quality micro pellet or flake food, even including an algae formula or a variety containing algae. Predatory fish get their green nutrients from their prey, so the guts of their food does well to include algae. While I have had preds live many years living mostly on ghosties, I do see the value of including fish in their diet. While ghosties have shells, the bones in fish are much denser; and more importantly, the live gut flora.