fixed bug #16 and problem with choosing new file