removed also an unneeded is_file() check