check pid instead of state file
Merge pull request #20 from crhan/check_pid

check pid instead of state file