small fix, add log and add return hash