Moved 'success' message into the begin block so it doesn't get printed if there's an error