CLOUDIFY-1335 added logs and refactoring