Use $fh handler inshead FH.
Opened pid file can't be symbolic link.
Check if pid file is regular file.