make sure folder_exists is a dict