File test

Move functionality from Database class to receiver/sender
Add configurable function
Fix read/write xml
Fix size control