improved error reporting
set version to 0.4
added checking and warning for duplicated layer names