Make sure image will saved as (not over) after changing it's type to Generated by clearing image's path in signal handler.