1) If you click delete it will delete the first item in the list. Perhaps make it so teh button is only active if an item is selected.
2) If there is nothing in the .txt file have it delete the file until something is added back to it.
3) No point in the close button as you can close with the red x. Perhaps have and edit option.