Better fit Go conventions
Add better error reporting