fixe #24 Change O_APPEND to O_TRUNC for PID file