You need a finally clause to close the buffered reader if it is not null