Adding active record extension and removing temp file