Out of bounds erros fixed. Binary logger implemented.