docs, better comment and new error check