Update to check directory