Consistent code style
Do not print but throw errors, more style consistency enforcement, minor API change