Added return typehinting for filetype