Updated printCenter function

Now tests for bad arguments