Added specific exception handling rather then the general Exception