Added error for empty code