Database works for small files (less than 4kb)