bug fix. Before, the function of deleting old logs which name includes <prog> does not work. Now fixed