fmt package formats an error by calling its Error() method. This results in recursion. Fix this. Also remove dead code. Signed-off-by: Anusha Ragunathan <anusha@docker.com>