I'd suggest to kill the file upgrade and move it's code in here