added logging when operations fail
convert bytes to int when requested