Shares of Safeway Inc. (SWY) opened lower Thursday as the supermarket operator reported an increase in third quarter earnings of 21 percent, aided by a $49 million after-tax gain associated with selling 16 of its Genuardi stores, but missed on revenue expectations. The gain helped pare declines in profit margin related to the company’s launch of a new customer loyalties program called “Just for U”, which Safeway will be a catalyst for sales in the future. The company noted that amid pressures from higher food costs and tough competition from discount stores, the Just for U platform has already driven higher volumes at its stores.

Traditional grocery stores such as Safeway and Kroger (K), the U.S.’s biggest supermarket chain, have seen sales get crimped by big-box retailers such as Target (TGT) and Wal-Mart (WMT) as well as smaller stores like drug stores and dollar stores that are expanding their food selections.

The operator of its namesake stores, Vons, Dominick’s and other grocery store chains reported a profit of $157 million, or 66 cents a share, up from $130.2 million, or 38 cents a share, in the year prior period. Revenue declined 0.2 percent to $10.05 billion, mostly because of the Genuardi divestiture and unfavorable Canadian exchange rates. Income from continuing operations rose 18 percent to 45 cents per share. Wall Street was calling for earnings of 42 cents on revenue of $10.24 billion.

Gross margin modestly edged down to 26.4% from 27%, largely the result of costs related to the launch of its loyalty program. Same-store sales grew by 0.5% and excluding fuel, sales grew 0.1%

The Pleasanton, Calif.-based company left its full-year profit forecast unchanged at $1.90 to $2.10 a share, incline with analysts’ predictions.

Shares of Safeway have slid about 25 percent in 2012 with today’s early morning loss of 5 percent.