PLEASANTON, Calif. – Safeway said Thursday its third-quarter net income fell 58 percent, hurt by a software impairment charge, higher theft and lower property gains.

Results beat expectations however, and shares rose nearly 6 percent in aftermarket trading.

The grocery chain, which operates 1,406 stores in the U.S., also says it’s exiting the Chicago market by early 2014 to focus on more profitable business. It operates 72 Dominick’s stores in Chicago that have been losing money. The move comes after Safeway said in June it would sell its Canadian stores.

Safeway and other traditional supermarket chains have been working to focus operations and keep costs low to fight off competition from big-box discounters such as Target and Wal-Mart Stores, as well as drug stores and dollar stores that have been expanding their grocery sections.Safeway’s net income fell to $85.8 million, or 27 cents per share. That compares with $157 million, or 66 cents per share, in the prior-year quarter.