extracted common parts of request intialization and release
added fsync
added test for verifying leaks