remove system.out logging information and invalid samples