Added an optional timeout argument for setting value for reading response (default 20). This value was previously hardcoded.