Minor

Modifies type of $container variable, and set the $ex->getMessage in the
try catch condition of open Method