Checks file for closing brackets