Updated: better exception handling