add bitly lib
improve perf and error messaging