Adding logic to read and process title tag