remove subprocess.check_output for the sake of py2.6 compatibility
fix the removal of nonmetadata