added function to delete current buffer and associated file