I couldn't predict when the gun would fire.
Good. That's what you want.
There are three basic ways to pull a trigger. Two of them are wrong.
#1. Wait till the sights look right and yank.
#2. Wait till the sights look right and pull slowly. When the sights move off the target, stop. When they look right again, pull. Repeat till the gun fires.
#3. Wait till the sights look right and pull the trigger straight to the rear without a pause.
Number 3 works the best, by far. Even if the sights move a little while you’re pressing the trigger, it won’t be enough to produce a bad shot. You’ll still get a good group and your groups will improve as you practice.
The shot should come as a suprise. If you know exactly when it will fire, you'll be much more likely to flinch. The more you practice, the faster you'll be able to work the trigger and still not know exactly when the shot will break. Top ranked shooters can fire in less than .2 seconds and still get the "suprise break" they're looking for.
Dry fire is a huge help.