Added server-side json validation
Fix indentation
Added little server-side logging