imageWriteToDevice function fix

Signed-off-by: shyeon.kim <shyeon.kim@scipi.net>