ignore IntelliJ IDEA project files
add close prepared statement
add guard for null pointer exception