If you have a push broom or something similar just hold it up close to the bird while it is flying near the ceiling and it will land on it, then ease it down towards the opening and it will fly away
Happens at my place several times a year, also a good idea if your latch release is red to cover it with duct tape or spray paint it black.
Most birds will never look down , there has been a many a wild quail over the years that has found it's way to some ones table because they won't look down when panic't or pressured.
Alot of ranches scattered across the SW have simple quail traps that exploit this trait, most folk's in this day and age would'nt have a clue what it was if they tripped over it.
Have fun