add check method to check if a pidfile points to an active pid