*added function which prevents invalid folder names