implemented sigterm functionality for both files