Adding error handling

A dialog box pops up when the inplane file does not exist inside the session variable.