cpp File handler changes with main

Compile errors are not been taken offf...