Added logger to utils.

* Fixes NameError that occured when open_secure_file was called
  with a non-prepared directory.