second major commit

Added logging
Added correctly double serialization mechanism