use try...catch to switch between local and server config for flickr api key