method to check path & ignore exceptions