Added POST param and error checking