very minor change to comment about device
fixed error message to use std::endl instead of '\n'