dedicated exception for errors from FFI
throw error on unsupported targets
cleanup buffered msg memory
fixes #2