move IO to later in the build: lib.pm now works, regex works