Investigation of dielectric losses in thin-film resonators