go fmt
Better error handling logic