added try in screenshot handling