Moved file removal to the handler