add pid_file support