Changed "echo" to exception to be able to catch and handle when needed.