Move check for existing folder to the main log method.