added Adapter.STATUS_UNKNOWN
catch JSON parsing error
Added dependency on module exit for Windows pipe compatibility