check_arguments() function modyfied for compatibility with older bash versions, arguments values checking added