Fixed parameters of the commonprefix function, fixes get_file function