Fixed cmake, main.cpp
file read improvements