Prepare file