remove the _prefix method
use finally instead of close at the end
remove unused or not good codes
try close cursor
use action_view to download when download manager is not available
remove unused variables