added log as parameter into apply, added more logging in apt, can log into a file and always logs in debug mode into file