Improve error msg, added TODO