Bug on opening files - C#