Fixed requires section to ensure the files exist before they are operated on.