With enabled buffering the output gets lost when the process receives a TERM signal. Disable the buffering.