Check that files are files, not that they're not directories
Don't use class << self for a single method