fix kill & exit - 'cwd' via json works for cluster_mode
remove illegal caracter on filepath for log/pid files