Production of pions in heavy ion reactions below 500 MeV/nucleon