opentoline for R2013 needs to be replaced by errorDocCallback
_moving linux specific funtionalities to the end of the script