You might want to set the parent directory as a variable in AppDesigner, and then use fullfile to generate the file names based on that.
That way you are not modifying the path after relying on it (which is the cause of the errors here). Not modifying the path is always best.