fixed bugs with opening a file

fixed bugs with opening a file, added the feature of showing the
current working file.