Please add a warning if not a file, looks like this change will make it silently ignore wrong paths.