Cleaning and splitting file