wrap old exception as cause, return directly if folder is null