removing write_pid_file() function which was only used one
tests fix