fixed: can't edit when txt file is nothing.