modified readserialfile