Unify style of get_*_name functions
Include file type into log messages

Also fix usage of "could not" and "cannot".