Switch monitoring to pidfiles