Added error catching in twitter module