Fixed bugs reported from Kai. This relates to folder naming when opening new file and save it to another file name.