fixed timestamp and check for json errors