fixed open file multiple times before applicationDidFinishLaunching on mac os x 10.8.4