Avoid logging messages twice on custom tasks