Exit before attempting to use nil variables on scanning nonexistent folder