Fixed incorrect pid_file being created