add state check into switch_event_disconnected()
refactoring unlink_pid()
- check pid file locked
added sleep