Add error handling, and timer
Fix EOL error