Use GLib logging.
Don't use memalign for allocation bur trust g_new.
Test the binary.