Much smarter require function, replace stdin with readLn