fix custom exception
move test sources to match src code