close to solution
automatically close window after file has been opened