Add support for 16k devices. Make errors print an error code.