use pid method; fix worker reconnection test; auto whitespace trim