fixed random not seeding properly, more descriptive error messages, and changed add_file_unless into add_file_if