refactoring main: readfile in runVM()

Signed-off-by: Philip <Philip@Philip-NB>