Trying to make some unit tests
updated serial to check its own conf and added more error checking