Now with proper writes and more debug

Signed-off-by: Lasse Bigum <lasse@bigum.org>