replacing puts with print error each broken