When going out the door, a large butterfly fluttered past me.
What is the BEST way to rewrite this sentence?
When I was going out the door, a large butterfly fluttered past me.
Going out the door, a large butterfly fluttered past me.
A large butterfly, going out the door, fluttered past me.
A large butterfly fluttered past me when going out the door.