Fixed files going to the wrong directory