Set file type earlier