import layer script, improve errors messages, metadata uploading via api
fix merge
fix layer_type
fix save metadata