adapted directory structure a bit
some additional checks