added pause/resume and close methods. Also, example file (Main) has been updated to show how to use this features