Improving unserialization errorproofness, adding JSON
Adding printf