checks dir before writing .env