Rewrote file controller