fixed checking of test enviroment and changed error reporter for server