add logback
add log4j.properties
fix decoding bug, add tests