read_cfg: Add remove space and comment function