add file exists/writable check for hosts and vhosts