Effects of metal enrichment and metal cooling in galaxy growth and cosmic star formation history