added session dir writable check