Added clearing text buffer before opening new file