Introduced a hack to wait for a mounted directory to appear before proceeding