change debug messages, bump version, write method factored out