library.cpp reads now files from directory