Added code to catch OS signals and cleanup processes... doesn't seem to be working