cleanup of memory for filepaths