refactored to use string instead const char *

Signed-off-by: Claudio Bisegni <Claudio.Bisegni@lnf.infn.it>