Remove some print statements; fix regex for errors