Added error handling for (un)stashing
Added test-environment