File.CreateText(npath)
not only creates the filename on disk but also opens it. So either close it in your CreateFile
method or change it to return a stream.
public static string CreateFile(string path, string title)
{
string npath = path + title + ".txt";
if (!File.Exists(npath))
File.CreateText(npath); //<-- File is not closed !!!
return npath;
}