added a printStackTrace in a catch block