When offset passed return RandomAccessFile when not return FileOutputStream