solved
final save before cleanup and adding checks and security