Adding exception handling for YUI require