add unit test for pid_file