File extension set as variable for functions