When I try something like that:
In debug mode it hangs for file (attached) motor.jpg. I don't know whether it is an issue that it was created on Mac or it is too old or maybe it is too big. But in my opinion this shouldn't cause hang! Thanks for God it works in release mode. How ever 99% time I am testing apps in debug mode...