JSON error messaging added