fixed opening file in OS X