This does not look very robust to me, isn't there some enum or something better to check status message ?