Wall Street closes lower but indexes end month higher