separated reading from executing in rest console (fixes #27)