Added errorhandling for function intsofsize

Now returns value for errorhandling and describes error through puts.