This is actually _copy_ of files in core-agent-linux repo.
most errors are reported to sending party, the only local left are pretty unlikely to happen, so simply log them to logfile (stderr).
This makes more clear which code have contact with untrusted data from VM.