Make sure $mitt has a value. I'd predict if you don't have $mitt = $_GET['mitt']; already in your code, $mitt will be null (which would be a good reason why you're getting a 0 length file).
Also note you have one super huge security hole which will allow folks to read just about any file on your web server your script has access to.