Add pid_file option, put app_id in file