Added check for deployment directory