I have finally solved the issue I had where imaging would fail to capture. It took me sometime to figure out what was wrong.
My profile was set to internal guiding but I was using PHD2 without using the EKOS guider.
I hope this is the correct process: Start PHD2 first. Then start Kstars and run EKOS with my profile set to external guider, PHD2. After a short while the EKOS guider connects to PHD2. Align and focus then start guider either from EKOS or from PHD2. Finally run my imaging sequence.