handling malformed line and adding option in web app