Fixed: Logs directory is not created in some contexts ( apache_itk )
(cherry picked from commit fbe4db6)
(cherry picked from commit 8aa0c56)