Please, post a simple example that would abstract your problem from your project. There is really no need to give us your GUI code when you know that the problem is in I/O. And define the problem...