fixes for images insertion + log creation