Move code down so latest file is correctly detected