Check existence of env var

 - Redirect files to /tmp if the corresponding environment variable does not exist.
 - Add logging messages.

JIRA: CG-49