implemented a better device selection. Try to use the first GPU device or if not found try to use first CPU device.
added class and method name to output.