Added better error checking to the pastebin module