Check commit function