Prevent lock and temp-File to remain after execution.