HOSTDEV-1730 adding try/except around state(filepath)