Have you tried to run the game in debug mode, to see if this is the actual cause? It could be that after the File Dialogue is triggered, some other function is causing the crash.