Automatically add file extension