message reading in server coded, logs added