Cleans and updates files