Refactor signal handling; add new utility function for logging job status.